﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace IceDog.EFCore.Models.Blog
{
    /// <summary>
    /// 博客文章
    /// </summary>
    public class BlogArticle
    {
        /// <summary>
        /// 博客文章id
        /// </summary>
        [Key]
        public int ArticleId { get; set; }
        /// <summary>
        /// 博客文章标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 博客文章内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Url { get; set; }
        /// <summary>
        /// 作者id
        /// </summary>
        public int AuthorId { get; set; }
        /// <summary>
        /// 作者
        /// </summary>
        public BlogUser Author { get; set; }
        /// <summary>
        /// 评分
        /// </summary>
        public int Rating { get; set; }
        /// <summary>
        /// 博客评论
        /// </summary>
        public List<BlogComment> Comments { get; set; }
    }
}
